﻿using System.Windows.Controls;
using System.Windows.Interactivity;
using System.Windows;

namespace nRoute.Behaviors
{
    public class SetFocusAction
#if SILVERLIGHT
        : TriggerAction<Control>
#else
        : TriggerAction<UIElement>
#endif
    {
        protected override void Invoke(object parameter)
        {
            if (AssociatedObject != null) AssociatedObject.Focus();
        }
    }
}
